package cn.edu.scau.cmi.wuyihan.client;

import org.springframework.context.ApplicationContext;

import cn.edu.scau.cmi.wuyihan.spring.domain.Student;
import cn.edu.scau.cmi.wuyihan.spring.util.ApplicationContextUtil;

public class SpringSingletonApplicationContextClient {

	public static void main(String[] args) {
		action();
	}
	
	public static void action() {
		ApplicationContext applicationContext = ApplicationContextUtil.getApplicationContext();
		Student zhangsan = (Student) applicationContext.getBean("zhangsan");
		
		System.out.println(zhangsan.getName() + "的毕业设计指导导师是：" + zhangsan.getTutor().getName());
	}

}
